Socket
Socket
Sign inDemoInstall

@bundle-stats/utils

Package Overview
Dependencies
Maintainers
2
Versions
460
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bundle-stats/utils

BundleStats utils


Version published
Maintainers
2
Created

What is @bundle-stats/utils?

@bundle-stats/utils is a utility library for analyzing and comparing webpack bundle stats. It provides various functions to parse, normalize, and compare bundle stats, making it easier to understand the performance and size of your webpack bundles.

What are @bundle-stats/utils's main functionalities?

Parsing Webpack Stats

This feature allows you to parse raw webpack stats into a more manageable format. The `parseStats` function takes the raw stats JSON and converts it into a structured object.

const { parseStats } = require('@bundle-stats/utils');
const stats = require('./path/to/webpack-stats.json');
const parsedStats = parseStats(stats);
console.log(parsedStats);

Normalizing Webpack Stats

This feature normalizes the webpack stats, making it easier to compare different builds. The `normalizeStats` function takes the raw stats JSON and returns a normalized version.

const { normalizeStats } = require('@bundle-stats/utils');
const stats = require('./path/to/webpack-stats.json');
const normalizedStats = normalizeStats(stats);
console.log(normalizedStats);

Comparing Webpack Stats

This feature allows you to compare two sets of webpack stats. The `compareStats` function takes the current and baseline stats JSON and returns a comparison object highlighting the differences.

const { compareStats } = require('@bundle-stats/utils');
const currentStats = require('./path/to/current-stats.json');
const baselineStats = require('./path/to/baseline-stats.json');
const comparison = compareStats(currentStats, baselineStats);
console.log(comparison);

Other packages similar to @bundle-stats/utils

FAQs

Package last updated on 07 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc